Skip to main content

Counter

Description

The counter tool is designed to keep track of the number of results that meet specific conditions from the outputs of selected tools. It acts as an attachment to other tools, and its primary purpose is to provide a count of results that satisfy certain criteria. The count obtained from the counter tool can be utilised as a condition in the If-Then tool, enabling the user to make decisions or perform actions based on the result count.

Settings

info

Zene UI

See Tool Flow - Counter Tool on how to add a counter tool to the tool flow.

Comparison Tool

The reference tool of the results used for the comparison. The results of the comparison tool are used as the basis for counting.

Input Tool

Referencing to inputs, only compare (only enabled) if the input is selected.

Period unit

The unit for the count period to last.

  • Frame: The count period is based on the number of frames.
  • Second: The count period is based on the number of seconds.

Period amount

This represents the quantity or amount of the count period based on the selected period unit.

Example:

Let's consider the Frame as the period unit, and the user has provided a table indicating the count for each frame:

Current frameframe - 1frame - 2frame - 3frame - 4
12345

If the user sets the period amount to 4, it means they want to know the total count over a period of four frames. In this case, the total count is obtained by adding the counts in each frame within that period:

1 + 2 + 3 + 4 = 10

So, setting the period amount to 4 gives a total count of 10 over four frames.

Filters

The counter number is counted by the number of results that passes the filters. Each of the tool have different starting count value, this can be 1 for the Input Tools or the detected objects count for most of the Process Tools, (See Tool Results Comparison for more details).

Depending on the tool, the filter may be different, please see each specific tool for details on the filter.

Invert Result

Invert the result of the filter. If the result of the filter is true, it will be counted as false and vice versa.

info

For the filter that counts, if the invert result is set and the count is more than 0, it will be counted as 0.

Types of Filters (Result Types)

Run Success

Whether the tool ran successfully or not.

Frame Width

Whether the width of the frame is within the specified range or not.

Frame Height

Whether the height of the frame is within the specified range or not.

Frame existed (Is Frame)

Whether the frame existed or not.

Is Connected

Whether the device is connected or not.

Temperature Celsius

Whether the temperature of the device is within the specified range or not.

Temperature Status

Whether the temperature status of the device equals the specified status or not.

Date and Time

Whether the date and time of the device is within the specified range or not.

If Result

Whether the result of the If tool is successful or not.

Detected Points RoI

Whether the detected points are within one or more specified regions of interest.

Binary frame on (white) area in pixels

Whether the white area in the binary frame is within the specified range.

Binary frame on (white) area ratio to frame

Whether the white area in the binary frame is within the specified ratio to the frame.

info
Zene UI

picture 6

Example - Detected Points RoI

The user can draw a region of interest in the box provided. This box can be empty, this will be shown is an empty black frame.

The RoI points drawn in the box are normalised to the frame size from 0.0 to 1.0. The top left corner of the frame is (0.0, 0.0) and the bottom right corner of the frame is (1.0, 1.0).

tip
Zene UI

picture 7

Example - Detected Points RoI Sample image

For ease of use the user can drag the image from the frame view to the Drag image here or click to select a file box (shown by the red arrow in the image above). This will automatically add that image to the box.

Object RoI Position

The position of the detected object where it is counted from. The following positions are available:

  • Total: All the points of the detected object must be within the region of interest.
  • Top: The top point of the detected object must be within the region of interest.
  • Centre: The centre point of the detected object must be within the region of interest.
  • Bottom: The bottom point of the detected object must be within the region of interest.

picture 8

Example - Object RoI Position

In the example above shows the points of the detected object (yellow) and each positions (purple), top, centre and bottom. For the total position, all the points of the detected object (yellow area) must be within the region of interest.

Overlay RoI

Whether to draw the region of interest on the frame or not. This will draw the lines between the points of the region of interest.

Detected Width

Whether the detected objects are within the width the specified ranges.

Detected Height

Whether the detected objects are within the height the specified ranges.

Detected Class

Whether the detected objects class are equal the specified classes.

Detected Text

Whether the detected objects text are equal the specified texts.

Detected Score

Whether the detected objects score are within the specified ranges.

Detected Confidence

Whether the detected objects confidence are within the specified ranges.

Polygon

Whether the detected objects are equal to the specified polygons.

Radius

Whether the detected objects radius are within the specified ranges.

Matched Index

Whether the detected objects matched index are equal to the specified indexes.

Code Type

Whether the detected objects code type are equal to the specified code types.

Tool Results Comparison

The following are tools and their results that can be used for comparison.

info

Note that not all the tools have the results that can be used for comparison.

Tools - Inputs

File

Started count value is 1.

Folder

Started count value is 1.

Webcam

Started count value is 1.

IP Camera

Started count value is 1.

Basler Camera

Started count value is 1.

Tools - Processes

Colour Detection7

Started count value is the detected objects.

Polygon Detection

Started count value is the detected objects.

Watershed Segmentation

Started count value is the detected objects.

Circle Detection

Started count value is the detected objects.

Feature Matching

Started count value is the detected objects.

Image Similarity

Started count value is the detected objects, this is 1.

1D-2D Code Reader

Started count value is the detected objects.

OCR

Started count value is the detected objects.

Image Classification

Started count value is the detected objects, this is 1.

Object Detection

Started count value is the detected objects.

Semantic Segmentation

Started count value is the detected objects.

Face Detection

Started count value is the detected objects.

Face Recognition

Started count value is the detected objects.

Key Points Detection

Started count value is the detected objects.

Pose Estimation

Started count value is the detected objects.

Number Plate Reader

Started count value is the detected objects.

Fire Detection

Started count value is the detected objects.

General Object Detection

Started count value is the detected objects.

Maximum count reset

Reset the count to 0 when the maximum count is reached.